<?php
App::uses('Component', 'Controller');

class MessageComponent extends Component {
    
    public function sendSMS($Text, $To, $From = 'PUC_GH') {
        
        if( trim($Text) == "" ) {
            return false;
        }
        
          $msg = urlencode($Text);
          $send_no = $To;
          //$url ="http://121.241.242.114:8080/bulksms/bulksms?username=sob-pucsms&password=pucsms12&type=0&dlr=0&destination=".$send_no."&source=".$From."&message=".$msg;
            $url ="http://txt.softbound.net/sendsms.php?username=sob-pucsms&password=pucsms12&type=TEXT&sender=".$From."&mobile=".$send_no."&message=".$msg;
        @file_get_contents($url);
          
          return;

    }
}
?>
